library(tidyverse)

load("cleandata.Rda")

fitland         = lm(afd ~ east + logdens + forn + migrant + unemp +
                     loggdppc + avgage + avged + minorleft + round,
                     data = filter(election2017, constit >= 900))

fitlandnominor  = lm(afd ~ east + logdens + forn + migrant + unemp +
                     loggdppc + avgage + avged + round,
                     data = filter(election2017, constit >= 900))

fitconst        = lm(afd ~ east + logdens + forn + migrant + unemp +
                     loggdppc + avgage + avged + minorleft + round,
                     data = election2017)

fitconstnominor = lm(afd ~ east + logdens + forn + migrant + unemp +
                     loggdppc + avgage + avged + round,
                     data = election2017)

save(fitland, fitlandnominor, fitconst, fitconstnominor,
     file = "models.Rda")